import React, { useState } from 'react'
import { Route, Routes, Navigate, HashRouter } from 'react-router-dom'

import Register from './pages/Register';
import Login from './pages/Login';
import Home from './pages/Home';
import Test from './pages/Test';
import StartTheExam from './pages/StartTheExam';
import EndTheExam from './pages/EndTheExam';
// import TestPaper from './pages/testPaper';
import Scroll from './pages/Scroll';
import Analysis from './pages/Analysis';


function App() {
  // const [count, setCount] = useState(0)

  return (
    <React.Suspense fallback={<div>加载中....</div>}>
      <HashRouter>
        <Routes>
          <Route path='/' element={<Navigate to='/register' />} />
          <Route path='register' element={<Register />} />
          <Route path='login' element={<Login />} />
          <Route path='home' element={<Home />} />
          <Route path='test' element={<Test />} />
          <Route path='startExam' element={<StartTheExam />} />
          <Route path='endExam' element={<EndTheExam />} />
          {/* <Route path='testPaper' element={<TestPaper />} /> */}
          <Route path='scroll' element={<Scroll />} />
          <Route path='analysis' element={<Analysis />} />
        </Routes>
      </HashRouter>
    </React.Suspense>
  )
}

export default App
